package com.company.test30;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.Scanner;

/**
 * Created by v on 16-12-5.
 */
public class Test3002Client {
    public Test3002Client(){
        Scanner input=new Scanner(System.in);

        String name=input.next();
        String street=input.next();
        String city=input.next();
        String state=input.next();
        String zip=input.next();

        StudentAddress address=new StudentAddress(name,street,
                city,state,zip);

        try{
            Socket socket=new Socket("localhost",8000);
            ObjectOutputStream output=new
                    ObjectOutputStream(socket.getOutputStream());

            output.writeObject(address);
        }catch (IOException ex){
            ex.printStackTrace();
        }
    }

    public static void main(String[] args) {
        new Test3002Client();
    }
}
